Fixing a number of bugs with heuristics. Adding the focus improvement heuristic.