Remove swap
Fix missing funcs