Fix a bug, clean some things up.