Moved functions to module, created skeleton for overall wrapper script