Adding support for toJSON

- allowing shortcuts to be created