Merged and fixed build errors.