Cleaned up, refactored, optimized
All based off talking to the T/A and looking at solution