Retyped MARK history code

moved to bottom of script, need to find breakpoints first