Further refactoring. Added a readme.txt which explains the reasoning behind the program-flow, channels, ports etc