Legislation and Surveillance Devices: How to Avoid Legal Issues