Address -Xlint:unchecked issues and cleaned up PinnableStruct a bit.