[proto] Main.java improvements