changed internal interface for middleware
_ prepending internal utils
typo of socket
moved graph to the right place