Javadocs, License headers and some cleanup