Improve Search in coffee script file

changed js last time, finally got it into coffee script after a couple
days of doing other things.