Made setup script more comprehensive.