Improved client-side scripts