Some fixes, cleanups.