Removed extra dispatch function
Some refactoring
Some refactoring and some peer messaging routines