non interactive shell and various bug fixes