Reorganized, cleaned, minor fixes.