Perhaps this should be cached to avoid massive database calls. Or it needs to be joined in a better way. Let discuss tomorrow/when we're both online.