Updated to process stray slashes more liberally