Rewrite spec utilities