Improved categoryAdd template