Add CTCP response functionality
Various fixes