fix bad ProjectDocumentSource.getNext() code

1. error callback had arguments in wrong order
2. spurious return statement returned bad stuff
3. code cleanup