Lots more changes.

Getting close to a publishable version. :)