refactored apps directory structure