Location and Clean functions improved