Code cleanup, parametrized startup