Initial work on refactoring code to PahiSetup
Because PahiSetup is awesome