Code cleanup. Fixes.