Complete control logic