Implement arc() and arcTo() functions. Some minor bug fixes.