I cleaned up code trying to fix contacts

I made some progress but still haven't fixed the problem. I found one of
the problems which was my table names has the wrong name when they were
created so the messaging table had the contact's tables name and vice
versa....