Added tests for value type filters. Fixed a number of bugs in
order to do so.