Added more tests & docs; added trig funcs