Add license file and comments
Cleanup code
More cleanup code