Fixed pagination, added csv download