improved scripts and Gemfile