Cleaning up some queries. Working on #203.
Don't return unpublished records for related(), make order consistently 'ORDER BY id', closes #181.