Rewrote methods in RecordImpl to use for-each loops and final variables