dev: refactor Dir a little