Finished implementing content filter.

Now also checks versions, tags and messages. Also fixed the filter being
run twice.