Pulling justin's changes; a few amendments though