Simplify startup, clean-up code