Cleanup some of the startup logic