include missing headers
add missing forward declaration
silence warning 'unused parameter'
fix wrong return type