Moved some of Will's code to the apiLogic file.