Problem 7
Made a few changes per hlint recommendations