Set up solving functions.