Added 2 exceptions and a few modifications