Adding dictionary support.

NOTE

- Need to return the dict
- Need to clean up code