Completed the first rough implementation of a drilling function. Other minor changes.