refactor, deps, bugs