Moving more functions to common