Bug fixes, and added unit tests for YapCollectionsDatabaseView