Fix several bugs on sensitivity calculations
Fixes issues #66 (closed) and #67 (closed) as well as another bug related to issue #67 (closed).
This also completely overhauls the way we do sensitivity discovery to improve efficiency and reduce complexity of the algorithm and code.