remove HostCommand in favor of Command, reorganize code