Update Main.java

cleaned up code