Towards a just system: Mental illness and cognitive impairment in the criminal justice system