Clone of Nikhil's version, ready to add minor modifications.
Mike's modifications to Nikhil's master branch