Support for multiple orientations

@vermontlawyer Can you take a look at this and let me know if it fixes your problem?  If so, I'll get it merged in.