Moved Rank enum to api so we don't have to use magic strings