Save input configuration. A few bugfixes.

Save input configuration. A few bugfixes.