added javascript version
cleaned up code
updated readme
fixed issue with keywords used as property names
namespaces can be written in lowercase (fixes #8)