Implemented LoudnessSensor feature and relatet tests

minor refactoring