Slight performance tweak lastIndexOf instead of indexOf in removeChild