Added improved version of build script