Some refactoring to the remote module