Added framework for control code