Formatted code and added solution to problem 7. Also noted problem 3 solution is not complete.