Move logic from -main to new console.runner namespace and refactor it; package files into core and console directories