repaired wrong logic regarding detecting Applic expressions. also added support for Or expressions