Code cleanup, consistency fixes.