cleanup & small fixes