Major update on the main class.