Fixed reconnection to server
Added removal of modules