Reorganized code into packages attempt 2