fixed some minor syntax issues and I am sort of hacking my way to differentiate between blobs with area and those without (I use the str() and check for empty strings)