handle empty records in output. ugly
fix typo in empty record printing
forgot to cast to float
massive refactor to use new classes