Fixed remove sensor and updates based on pull request.