Code reformulation