fix removal of symlinks; clean up tests to use lazy lets