Refs #5594 - Clearer JS implementation