Removed unnecessary code. Changed interface of Application class.