master api models refactored out into separate file.