Improved setup script