Fixed potential problems in AdvancedLogicElements
Fixed potential problems in LogicElements
ProjectModel inspected and refactored.
VisualEditor inspected and refactored a little bit.
Merge branch 'feature/fix-bad-code' into develop