Change to use promises, move all configuration to the server and upgrade libraries