Move shell templating function to be accessible by the front end