Fixed command line mode issues; more work done in the scripting system.