Refactored rest calls