Huge refactoring, pythonify sourcecode and clearer modeling