fixed portrait view on tablets
cleaned up code