Major code structuring changes and starting off with javadoc