Refactored expect_* implementations. Also documented expect_* functions.
Deactivate warnings where they are generated.