Restructure to use wrapper functions.