made pagination installable.  converted to coffeescript.