Added docs + unit tests