Test for whitespace too when testing for a relative path
Refactoring and minor optimizations of hints