More Refactoring

Cleaned up some code.
Created a JSONParser class that handles all the JSON parsing.