maploom template work

- extract some common scripts to a common include
- added comments
- move maploom controller into body element to allow others