Handle actions of context menu, fixes #18