refactor datamanager classes and include javadoc format

Refactored the code in DataManager classes and also added proper javadoc banners and comments.
Please take a look at this and merge as soon as possible. Thanks!