Improving the way we parse the contacts

fix #1
fix #2