Updated code for remote support, not yet finished