re
Initial Refactor of API calls

Prior to this commit there were 5 identical API calls.  This commit makes the code more DRY.