Adding database querys, initial checkin.