Added License, and deleted useless code