Fixed syntax errors and typedefs