Exercise 1 complete and refactored
Exercise 2 complete: added empty()