Implemented most of the basic filtering. Tests nearly all working