Minor improvements on build system