Legislation and code of ethics