Working version. Still needs constant expression evaluation in conditions.
Name refactoring.