For future reference, there is no need to remove either the derailleur or the chain to get the rear wheel out. Shift into the smallest cog on the back, loosen the axle nuts, and slide the axle forward in the frame dropout slot. The derailleur can swing back out of the way as the axle drops out of the frame. Leave the chain intact, routed through the derailleur. After you've fixed your wheel, position it under the frame with the chain resting on the smallest cog. Slide the axle back in the dropout slot, center the wheel in the frame and snug down the axle nuts. The derailleur will swing back forward as the chain picks up tension. Check the brakes to make sure they still work before you ride off.