small fixes, cleanup