Some minor cleanup to chi