Edited deleted code from MenuFactory