All is working now. Just need to clean some debug code, add README.md and we can merge into master.
Removed debug code (should be moved to testing). Updated README.md.