Added docblocks & unit tests