Move swap and dimensional impls into separate modules