Added prototypes to silence warnings, and some formatting changes.