fix minor bugs in data.js and add Template.php

Signed-off-by: Roger Manich <roger.manich@gmail.com>
Merge branch 'master' of https://github.com/sparkbits/nexum

Conflicts:
	js/data.js

Signed-off-by: Roger Manich <roger.manich@gmail.com>