using javascript 'strict' mode in server
fixed a few variable definitions