Updated Main.java and flex files