Several fixes and unit tests for collection and pagination features. Added support for bulk saving.