(It'll be moved to mas-frontend-helpers once we're happy with it)