Initial commit into github. This is the version used for the GMD paper.