Remove unused variable, add return value to function to avoid warnings.