removed duplicated code
added tests for record generator
small improvements in TestSuite