Reorganize codebase and add Maven poms to prepare for distribution.