Compile with -pedantic -Wmissing-declarations -Winline.

This is the split pull request without the casting hell.