Implemented convertion to dictionary.