Added more debug to gears, created a debug sub set function, added java notes