Function functionality mostly complete.