Moved helper functions to IRC