major backend directory refactoring