Refactor marker directive