Added validation of existing names before submit and fix source of backend error message

GCP-10132

Reviewer: Mae Isabelle Turiana
Added junit methods for validation of existing variable name

GCP-10132

Reviewer: Mae Isabelle Turiana
Stop validation once error is encountered

GCP-10132

Reviewer: Mae Isabelle Turiana
Clean up, changed double quotes to single quotes in js scripts, removed warnings in arraylists, moved else statements after closing braces, moved trailing comments to next line

GCP-10132

Reviewer: Mae Isabelle Turiana