Fix affix logic and refactor now marker logic into directive.