Anatomy of the criminal justice system