Filtering of record attributes improved and some code refactoring done.
Added more tests
Added tests for several record attributes.