Add Main.java to start application and fixed some dependencies for the application start.