Enabled more warnings. Fixed several issues.