make parsed gd values ints, clean up, correct references to other functions