Debit restful

starting debit restful refactoring