Fixing build issues in Main.java