Improved analysis scripts