Remove obsolete main code