Updated code for Hokanson_2013. Fixed some bugs and documentation in other files.