Fixed critical bug with getting a friend number given an ID, it was making deleting friends impossible. Also cleaned up some various parts in the code.