Cleaned up the C-Code to remove type warnings.