Performed some more minor code cleanups/fixes.