Set first account checked as default when the current used account is removed and added some comments into the code