Tidying up.
Fixed up unmanaged extension assertions.
Formatted for clarity.