Removed a bunch of redundant code by having APIs call one another.