Add license
Improvements and bugfixes