Added dictionary and init function to handle function and initial conditions