Dynamics of a Bose-Einstein condensate near a Feshbach resonance