Updated code, tests and README