Revert "Improvements in logic"

This reverts commit d8b5f2f0b747ac4decdf29fb568801aa676c3d37, reversing
changes made to c4fa2eab3d33c16a1fac1f5ab9e6d392061cc442.