Perform some small refactorings