Added support for printing multiple return values, few other changes