Restructured python code to make hierarchy of source files, much more readable, needs to be continued, but MOG is now integrated into the inputs and line