Added exceptions, doc blocks