Three point midpoint and error

reorganization