Move more code into extensions. Better structuring of exception data.