Added command listeners for the main classes.