Important fixes in functions. Now everything seems to work. Last step before using new Landsat images.