Cleaned up javascript for step generation.
Merge branch 'CORE-1104' of github.com:frontlinesms/frontlinesms2 into CORE-1104