Skip resource compilation when not needed and a few other tweaks