Refactor marker initialization