fix general errors and formatting
remove protocol improvements specific code