Loading/referencing features for scripts, and a bunch of tests/fixes.