Now that I look at it, maybe we should pull lines 426-435 (the new lines) out into their own function?
I had left 2 var scopes at the top of that IF statement, meaning to pull them to the beginning of the function (but forgot). However, that means we will be var scoping variables every time that are only being used some of the time. 

So maybe a 'primeMajorTicks' function, which will encapsulate and contain these new lines?