refactor packages
implement spawn modes and cleanups