Code cleanup
 - Removed brackets where possible.
 - No more assignments in if-statements
 - Refactored out unsafe argument array checking