A rework of markupfield by jamesturk