Fixed helper functions, added license info and README.