refactored index and updated tests for new exporting method
fixed pagination bug
more refactoring, added validations, updated tests
fixed PR issues
Merge pull request #1 from Retsly/refactoring

Refactoring