Some cleanup, add FIXME and TODOs.