A medical device for performing medical procedures inside a lumen (such as the GI tract) of a patient is provided. The device includes an elongate flexible member which can be advanced along a track. The track can include a loop portion which can be advanced ahead of the elongate flexible member. The distal end of the flexible member can include a camera, light source, vacuum opening, and a working channel for receiving medical instruments.