filtering out contains and fields along with various other fixes