Update records to use new code from pylint fixes

Refactor records implementation code