Most of the code in actionbar.ejs `function addControls()` was duplicated by copy & paste for speed of development. Refactor the function, possibly adding helper functions, to reduce redundant code.