Some fixes

wondering how you feel about lazy initializing this, instead of initializing when the script is inserted? Maybe in a follow-up if after some measure we see it takes time.