Main.java fixes for stdout