Partially implemented offset history graph; cleaned up code; fixed minor bugs