Replace left over tabs
Refactored to keep modules separated and some cleanup