Enable a few more warnings and fix code accordingly