refactoring, more CTCP work