Added functions to contacts.cpp

Probably a lot of bugs because I did this in a simple code editor without compile, we ll look through it, see if I need to make a lot of changes or not, might be missing a lot of if statements for cases in which we should return false, wasn't sure to include them or not.