Improved readability of some functions that I missed.
Improved readability of variable declarations.
Fixed the restrict keyword at 2 lines.