Refactor exercises 01-06.