(cleanup) adds documentation and tests