Add more specs, update README and refactor the code