Fixing a few refactoring things