Update usandfriends.h

Added extra functions, fixed some bad code.