Modified ContactManagerimpl, removed some of the nested if statement