Updated js stuff for onchange and fixed spelling