Moving marking logic to its own class and file