Rewrite, fix tests and set version to 0.0.8