Clean directories and minor fixes