Added support for distance fields and cleaned up a litte bit some more lines.