Added distance to interface and optimized Class analysis
- Merged Kai Hufenbach's changes that allow custom JSON writers to be used for interfaces
- Merged Kai Hufenbach's changes that allow custom JSON writers to be used for interfaces