Commit #12: Refactoring some code