Split code into packages properly