changed json rendering
refactoring plus error handling for incomplete address