browser tests, fixes to make everything work both in node and browser

added grunt task ”server” to make browser tests