Refactor exercises 01-10.