Rewrite wrapping logic and fix collisions! (mostly)