Refactoring and add the gyro controller