I wrote this for a few contract jobs in October, 2012. I've since used it for lazy hacking. It's terrible code.