Reorganized code into better packages.