Reformatting the Javascript and Velocity