Cleaning up printing out and fixing an error with incorrect dict keys