fix small bugs
fix add friend feature, change way declare some functions js