cleanup & small refactors