Removed IElementsGroup api. Fixed If bug (not invalidating previous result). Code cleanup