Condensed code

Context menus removed duplicated code.