Added location array and url parsing