Refactor a few things.