Fixes to Makefile and a few JS hiccups.