Got rid of swap() class, used pair's swap() instead