License added, code changes and new readme with examples. Major modifications still needed.