Finished coarse version of DataframLoss
Needs to be tidied up.
Also might need some exception handling.