Startup script enhancements

Miscellaneous enhancements to the startup scripts.  I realize it's probably bad form to mix these into a single pull request; if you like some of the changes but not all of them, I can clean the branch up to just include what you approve of.