Improved script and css for SMGT theme