Split out spending API into separate file.