More tweaking to make the code prettier.