Merged with Garry's code formatting commit.
Reformatted my own code to conform.