Refactor: replace spaces by tabs, cleanup usings and other small cleanups