Adding license and cleaning up code
Cleaning up code