generate_json speed improvements, code cleanup, comments
Merge pull request #1 from natepixel/generate_json_optimization

generate_json speed improvements, code cleanup, comments