many minor improvements