Solved problem 4
Cleaning up code - putting curly braces back in for easier maintenance
Solved problem 5
Solved problem 6
Commenting on problem 6
Solved problem 7
Solved problem 8