fix for units in resultsdetail, buttons to select range on graph, code tidy