Patch by klausi, fago, clemens.tolboom, japerry, helmo: Access API fix for lists of referenced entities and integration improvements for comment, node and statitics. Includes improved test coverage.