Sync with melamid

* Closes #41 
* Closes #42 
* Closes #43 

Should be merged along with https://github.com/amplab/melamid/pull/105