Fixed issue with friends updates repetition and code cleanup