code clean up and use Adityas filter module