Completely reworked the AutoRemote communication layer based on work from João Dias.
Fixed some bugs and added a CLI.