Cleaned up initialization code using defines