Added exceptions
Added documentation