Added filter functionality (still untested). No env variable yet.