add js file and some small fixes to server