Minor cleanup. Now it seems to work.