rewrite of markup plugin

hey Alec,

here you go -- rather substantial rewrite which should address your concerns, including URL rewrite stuff. looking forward to your response.