Minor cleanup and fixed regression in 1.7 that could throw an error if GSAP files aren't loaded in a certain order

Fixed issue that could cause an error if GSAP files aren't loaded in a
certain order (introduced in 1.7) and cleaned up a few other very minor
things in the code.