Minor codechanges and cleanups.