Fixing and compiling. Fixed typedef.