Remove unused exceptions and code, tidy