Move the logic to functions
Fix element id and class
Merge branch 'frost-nzcr4-ft-element-id-class'