Frustrated trying to get the JS front end to work