Fixing missing headers, fixing function call init