Fix for menu offscreen problem.
Code cleanup