formal changes; code improvements