Fix up the code. This will be squashed later.