refactor address book js and jquery