Adds main class