fixed a typo
added code for preserving calls even if their assigned value is not used
rewrote the if() simplification for && and || constructs.
wrote lots of code which should take care of combining loops properly.