Task 1 Cosmetic API refactoring, added checked exceptions