Working version with tests and documentation generator