Functional and ugly version of saving details to a new record