Performed some minor code cleanups/fixes.