javadoc fix
synchronization fixed. some refactoring done