Modularize backend