Tests and documentation added