Working on the right click menu. Some refactoring