Fixed issue with trim and typo that caused javascript to error out
Merge pull request #4 from BrianAdams/master

Fixed issues found in pull request