Implemented second order modal logic.
Fixed all known bugs.