Renamed "rewrite" method to "apply"