Minor modifications, mainly focusing on increased test support using TestableShell.