Added ExpressionEngine version detection, code cleanup

version detection for expression engine