Fixing some of the basic problems with the pseudocode - still doesn't compile the swp.h file.