Fixed major reference bugs, added gear and various other things