Added JSON parser
Cleaned up poorly formatted code