Added License and Bug Fixes