Cleaned up startup code