clean things up, handle error conditions better :see_no_evil: