Refactored event framework and done with tcp transport