Added comments to swap.c