Ansify function declarations and fix some minor style issues.