Code cleanup and readme update
Add license info