Improved TLog + refactoring