Bit of work around filtering and some tidying up