added licensing info and javadoc