Fixed Spine issues.

Also did some optimization via caching variables.