Minor improvements on building script