minor improvements throughout