Added socket.io and redis pubsub configuration. cleaned up security policy and created hook.