Fix for memleak in dictionary alloc
Minor cleanup
Fix memleak in dictionary read