[baragon] starting migration of core functionality to submodules