Break out the API and local store into separate files.