BUG/CLN: Refactoring tsplot