Minor refactoring of get_status