Updated Basic flight code