Enable more warnings (and optimizations) and fix them