Corrected main template & constants management for trik