Moved the average function into a separate file, patched up RM#calculateSystemLoad