added the pagination option, fixed period=Inifinty, cleaned up the coffeescript a bit