Better browser-pipemenu, all repeating code was moved to functions. Other refactoring.