Add magic, rewrite stuff