refactored activities into base activity for common menu handling