Added a test and some docs