Double-checking code & cleaning up, + style fixes.