PROJ-121: Less hacky JS, used Datables built-in functions