Fixed set method to include exception
Modified clear() method a bit