Added test code, tweaked the project, added some documentation.