refactor dependency into packages for use for server side dependencies