Updated main class.