Added more exceptions and throwing of exceptions