Better factoring out of back-end