Adding restful module.
Leave the idea of pure JS and use the modal API i created.