Update and rename exchange.c to magic.c