Refactored some code

Moved pyRit to a class, started setting up Flex objects and parsing to
JSON, still a lot of work left!