Refine back to desktop code