refactor public directory layout