refactor: Directory and Tag classes separated.