Many bug fixes.

See the changelog at http://changelog.keymapper.club for more details.