Exercises to add tests and refactor code