Clean up and refactoring

  1. Remove unused methods and variables. E.g. **Cavity.isSnapshotSimilar() **is it used?
  2. Move Map<String, String> resources to RFLDocument. It should NOT be static. that way we will be able to have different resources for different documents.