Code cleanup.

- Replace ‘typedef’ by C++ ‘using’;
- White spaces;
- Remove unused type definitions.