Added documentation & tests