Fixed errors in main.java