add some basic data filtering capabilities. some more cleanup.