Refactor classes into separate files
Refactor into main() method
Fixing import for readability
Initial threading support in Python code, still need to update the C code to remove exit call