Refactor lexima's initialization process