Refactoring basedir