Support for menus on both sides/right side only

I had to make a significant amount of changes, and there are certain parts that could be optimized, such as the pan gesture recognition.  Feedback would be highly appreciated.