small fixes + more cleanup