a lot of refactoring in the ttop.