Sanitizer: removed redundant code and added documentation