Bug fix and finished wrapping.