Cleaned out coffeescript version - will try JS