Larger refactoring.

Refactor into some irc objects or similar. Clean up messy test code.

Keep old code in a folder for now, easy of use while
refactoring/developing but should throw it away shortly.