js directory structure and require optimization