Removing compile warnings by adding proper typedefs and others