Added method to include inline scripts, refactoring