Fixed a bug where gear would not reset properly, and I cleaned up some code