restructuring, setup script with console-script, endless loop