Adding exception and minor documentation