Integrating Scott's changes