code design refactoring
Merge pull request #87 from TwistedLogic/master

Code design refactoring