Added GPL 2 License and bugfixes