Code cleanup and removed a throw