move Close code closer to where being used
add support to reopen closed accounts