main: little cleanup
enhanced JSON export