rearrange some logic

use variables to control on which files to load, in addition to the old
way that uses symbolic links.