Added missing package
Refactoring, added validation of ownership for device and sensors