Sundry python changes, reorganisation.
Enter insertion state on magit commit.