Legal advice and legal aid in court