Various fixes, make /js work well

Fixes #6