Updated documentation. Added more tests