Fix unused parameter warnings
Fix floating-point conversion warnings
Improve typedefs
Fix function declarations
Fix declaration shadow warning
Fix integer conversion warnings