Refactored to use cfscript functions