Fixed more syntax errors

My lack of knowledge on Javascript is showing! Decided to copy and paste
to avoid these errors. Also, I tested in the browser before creating the
apps