Refactor some code in mps.c to reduce header pollution.

Reviewed by:	gibbs
Obtained from:	Netflix, Inc.
MFC after:	2 days