Extract things to before filter