Refactor ContentDirectory