more testing and cleanup of class swapping