minor fixes and clanup (wip)