[INTERNAL] Made a few changes to make the code easier to read.