added page nums; cleaned up coffeescript