Clean up old code, and fix extensions.