Remote commander rebase

Rebase of PR #1449, with style fixes, courtesy of inspekt :)