Added license header and javadoc