Significantly re-worked internal path definitions.  Should fix many bugs, will probably introduce many more...