Some code cleanup, put contact search inside DatabaseController