Fix exception handling
More cleanup