compile every file in its own environment (beta)
some fixes to previous commit