Updated build system to be more rugged