Cleaned up initialization process.