fix environment creation, move menu into the real file