Added swap.c and swap.h