Reimplement main class.