Filled out function definitions.