Refactoring kata with really bad code :)
Try it, to get code 100% tested, more testable and readable.