build: various build improvements