Starts rewritting main class