Added documentation and modified some exception propogation code.