remove test - moving metatables out
update swapflags to new metatable style