cleaned up embedded script loading