if/while with const condition optimization, const values optimization, return in-block scope skipping optimization, more errors checking, other small fixes