simplification in substitution and function evaluation
fixed wrong condition
minor refactoring
Merge pull request #1205 from andreistefanescu/master

simplification in substitution and function evaluation
removed duplicate code
Merge pull request #1206 from andreistefanescu/master

removed duplicate code
wip on meta
Merge remote-tracking branch 'origin/master' into feature/KORE-convertors