LPS-43586 minor optimization to logic
LPS-43586 Add tokens to scripting contexts
LPS-43586 Add missing import
LPS-43586 Source formatting