Added exceptions and small updates