Improve several build tasks