Simplified the way results are stored
Added functionality for calculating different loss functions