Improve name_filter speed
Regexp compilation moved outside of loop
Small code optims