change Application constructor to public method