Minor changes

Changed access of contact fields to read only
Changed methods related to database