refactor startup into config file