Rewritten Java output and tweaked Main. Currently introducing overloading