Working on exceptions and fixing bugs