Fixed JS issue with incorrect player movement
Replaced strings with constants in map module. Fixed refs.

Apparently I know nothing about javascript byval/byref param
passing. :( Strings are immutable so if you try to play with
something like a linked-list you could easily end up in a dead
loop.
Syntax changes. Renamed map module functions