[ref] Big badass backend refactoring