Extracted filter helper class and added joins