[galaxy-dev] [hg] galaxy 2985: Refactoring and bug fixes for grid templates.