Added record and recordsorter classes