adding license
Some cleanup and fixing javadoc