refactored placename output; added xml output; added logging mechanism