more backend refactors