Add information about license and copyright. Clean up some code.