Cleaned up some initial loading code.