clean code and added licenses