Several minor improvements