huge refactoring to support websockets for vs-admin