Working draft
Improved readme
Added testing and fixed a couple of bugs