Some fixes, added license