Refactor the status handling, and move some helper functions out of list prompt
Better expand error handling