refactors post controller to lower import complexity