initial support for scripts.

loading and saving works, not wired up to the editor yet.