refactor and improve the initialization of vital