Minor refactors

Cleaned up the JS a little and added js to the makefile syntax
checking target. Added a mysql-port option for the server.