Simplify configuration loading
Refactor websockets and polling routes to share repository