Revert "remove unrelated code, simplify directory"

This reverts commit 05444da341621dad4133090e02f586494df114fc.