Re-structured to allow popkern to act as a module
Fix wrong argument in setup