Refactoritation and add PUT and DELETE REST Method