add comments.
add modules to compile tests.
improve documents, code, and write tests.