Reorganized code into packages.