Refactor BuggyRemote code