Doing some minor refactorings