render views, make sockets a module, use promises