Refactored code to remove and abstract away primus.js
Installed ws