move websockets from models to controller