Add license file
Cleaned more code