Reorganize project structure.
Add javadoc & pass tests.