Fill out struct initialization.
Fix type conversion warnings.
Clean up unused param.