Added passing of exception
Added returns to redirects