Fixed licensing
Code cleanup