added handling for dynamic scripts, styles and models