fixed bunch of REST API operations (controllers), SmartDevice is missing, yet to be finished See merge request !13