cleanup, small fixes, to be continued...