Style note, look at process_success and process_error (particularly in the hosts_controller for examples) as it can combine the printing of a notice and a redirect just back to the last page (which is mostly what you're doing) or to a given path.