Added copyleft
Code cleanup