Added better IF handling infrastructure, return implemented