Filtering and colour coding

maybe a refactor