Do explicit type conversion (fixing clang warnings)
Comment out unused method arguments (fixing clang warnings)
whitespace; fix comments; make local functions static