Start of test, realpath seems troubling me
major refactoring
resolve merge conflict