Optimizations refactoring. Tests fixes, new cases added, new way of optimizeAST running added.