Some additions

Hi Ivan,

See the commit messages for descriptions.