Test code cleanup.
Add start of tests for contact listing. Filtered out nil from list of referrers.
Remove trailing newline.
Merge branch 'dev'