Simplified some of the javascript
Limit map identifiers to 6 chars
Added index