Improve compilation behavior

No modifying global values, better highlighting. See the commit messages.