Added frame setup code