Refactoring, remove need for rootdir option