Started rewriting with TDD