Fixed errors detected by testing
Added testing for dictionary