Cache velocity data

Avoid reading the velocity JSON data after the first time through by caching it in memory.

Also cleans up tabs to spaces in js file.