Slight changes to init to prevent double-initializing application.