Added in new unwrapping to main function.