Improve dictionary key formatting.
Better nested formatting.
Added testing file.