Minor refactor of setup env script