Clean up duplicated marker code.