Slight modifications for use as a module

Doesn't load up callbacks if imported as module as opposed to run