Move backend specific code to dedicated package