Fix a few small bugs, cleanup repo.