Added a superclass to extract out common menu