cleaned up blockexchange

will start refactoring lib to use similar pattern as blockexchange