Added a couple more conditions. Added IRange interface.