Changed type definitions and added first pass at Exceptions.