Fixed warnings and parameter name mismatches, added #include needed in some platforms.