fix simulator issue with landscape mode
more code cleanup