IRC bridge and lots of refactoring