updated model associations and added model: historicrecord - done, not yet tested.