Changed API, updated tests and added Readme