Added a main module and class, updated run scripts to use it