Removing unnecessary template code