Created rest design

Created the rest design so we can start building calls. cleaned up a lot
of the code so its neater.