Fixes and add tests and README