Refactor remaining stuff.