Fix some compiler warnings.
Unbreak loose storage contract handling.