refactors app bootstrap