I know your question has already been answered, but I would just like to tell you that corners can be entirely done by 1 simple alg:
/ (3,0) / (-3,-3) / (0,3) /
If you only need to swap 2 adjacent corners, just do Alg (3,0) Alg. If you need to swap 2 opposite corners, just do Alg (6,0) Alg. If the corners you need to swap are on the bottom: Alg (0,3) Alg and Alg (0,6) Alg.
It's that easy and very intuitive