Moved context menu definition and added security option