This is so wrong
Disable too-many-branches warning
Disable too many arguments
Fix uninitialized variable