Unit tests and docs added