Added whitespace safeguards, simplified path