Added Documentation. Added unit tests