some optimizations
add target for swapNodes to Makefile
Fix bug in swapNodes when the list was of odd size