Removed unnecessary code and transitions