Compressed Spring bean config ionto a single file.

Cleaned up threads on shut-down.