Removed external script load and fixed redirect