Refactors CP2 to pull instances code into a separate file

Change-Id: I2e6046dcdec0f134724d8220525bd2395677f19e
2 files changed