Better example/API/test file.
Added basic documentation.