Improve command handling; remove remote mode