Split out main class