several fixes, code improvements, see NEWS