Added more tests and some documenation