Added rest of main server side javascript.