Remove commented out group code. Rename smart variable.
Add script handling functionality.