Refactored js inclusion