Cleaned up code in razor tasks to use new function in asm/utils

DO NOT MERGE until after 8.0.1.