Portrait code.  Not working all the way yet.