Merge pull request #2 from KellyBlack/dev

update bethdev
first version of matlab function for Z and X
Merge pull request #6 from sweenee/beth_dev

pulling Dev into Beth_dev before pulling my code into Dev