Finally decided to run 'ruby -c against this file to catch all syntax errors.
Also fixed new Array (dang javascript) to Array.new