Refactored functions and classes related to argument templates