Use #attached and move our monkey patching around.