Reorganized code using packages