Implemented (partially) If statement handling