fixed define statements

added enqueing action for each control function
fixing compiler errors