Refreshed javadoc, added documents, refactoring, some cleanup