Making the cleaned code work on warp