Setup function.