small refactor + cleanup