Fixed recently broken gradient code
It turned out that "repeat" was already a property of String.
I renamed some variables and did minor cleanup.
Merge pull request #64 from concord-consortium/gradient-fix

Fixed recently broken gradient code