Some bugs fixed. Using database to store contacts