Added PI Type chooser and updated statechanger to handle States from any PI Type